import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const state = {
    loginDate: {
      dialogVisible: false,
      userMobile:null
    },
    platformNoticeDate:{
      data:[],
      id:0,
    },
}
const mutations = {
  loginHandleOpen(state){
    return (state.loginDate.dialogVisible=true)
  },
  loginHandleClose(state){
    return (state.loginDate.dialogVisible=false)
  },
  getUserMobile(state,mobile){
    return (state.loginDate.userMobile=mobile)
  },
  PNoticeHandle(state,msg){
    return(state.platformNoticeDate.data=msg)
  },
  PNoticeHandleID(state,id){
    return(state.platformNoticeDate.id=id)
  }
}

export default new Vuex.Store({
    state,
    mutations
})